package com.ssy.lingxi.after.sale.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 换货商品表
 * @author 伍将
 * @date 2020/9/11
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "as_replace_goods_detail",
        indexes = {@Index(name = "as_replace_goods_detail_replace_id_idx", columnList = "replaceId")})
public class ReplaceGoodsDetailDO implements Serializable {
    private static final long serialVersionUID = -4325616155906906964L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "replace_goods_detail_seq")
    @SequenceGenerator(sequenceName = "as_replace_goods_detail_seq", name = "replace_goods_detail_seq", allocationSize = 1)
    private Long id;

    /**
     * 换货id
     */
    @Column(columnDefinition = "int8")
    private Long replaceId;

    /**
     * 订单记录id
     */
    @Column(columnDefinition = "int8")
    private Long orderRecordId;

    /**
     * 订单号
     */
    @Column(columnDefinition = "varchar(40)")
    private String orderNo;

    /**
     * 订单id
     */
    @Column(columnDefinition = "int8")
    private Long orderId;
    /**
     * 商城id
     */
    @Column(columnDefinition = "int8")
    private Long shopId;

    /**
     * 商品id
     */
    @Column(columnDefinition = "varchar(16)")
    private String productId;

    /**
     * 商品名称
     */
    @Column(columnDefinition = "varchar(90)")
    private String productName;

    /**
     * 商品规格
     */
    @Column(columnDefinition = "varchar(40)")
    private String type;

    /**
     * 品类
     */
    @Column(columnDefinition = "varchar(16)")
    private String category;

    /**
     * 品牌
     */
    @Column(columnDefinition = "varchar(20)")
    private String brand;

    /**
     * 单位
     */
    @Column(columnDefinition = "varchar(16)")
    private String unit;
    /**
     * skuId
     */
    @Column(columnDefinition = "int8")
    private Long skuId;
    /**
     * sku图片(App售后显示)
     */
    @Column(columnDefinition = "varchar(512)")
    private String skuPic;

    /**
     * 采购单价
     */
    @Column(columnDefinition = "decimal")
    private Double purchasePrice;

    /**
     * 采购数量
     */
    @Column(columnDefinition = "decimal")
    private Double purchaseCount;

    /**
     * 采购金额
     */
    @Column(columnDefinition = "decimal")
    private Double purchaseAmount;

    /**
     * 换货数量
     */
    @Column(columnDefinition = "decimal")
    private Double replaceCount;

    /**
     * 退货发货数量
     */
    @Column(columnDefinition = "decimal")
    private Double returnDeliveryCount;

    /**
     * 退货收货数量
     */
    @Column(columnDefinition = "decimal")
    private Double returnReceiveCount;

    /**
     * 换货发货数量
     */
    @Column(columnDefinition = "decimal")
    private Double replaceDeliveryCount;

    /**
     * 换货收货数量
     */
    @Column(columnDefinition = "decimal")
    private Double replaceReceiveCount;

    /**
     * 换货原因
     */
    @Column(columnDefinition = "varchar(60)")
    private String replaceReason;

    /**
     * 是否需要退货 0-否，1-是
     */
    @Column(columnDefinition = "int")
    private Integer isNeedReturn;

    /**
     * 是否含税：CommonBooleanEnum
     */
    @Column(columnDefinition = "int")
    private Integer isHasTax;

    /**
     *  税率
     */
    @Column(columnDefinition = "decimal")
    private Double taxRate;

    /**
     * 合同id
     */
    @Column(columnDefinition = "int8")
    private Long contractId;

    /**
     * 合同编号
     */
    @Column(columnDefinition = "varchar(50)")
    private String contractNo;

    /**
     * 物料
     */
    @Transient
    private ReplaceGoodsDetailAssociatedDO associatedDO;

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }

    public Integer getIsHasTax() {
        return isHasTax;
    }

    public void setIsHasTax(Integer isHasTax) {
        this.isHasTax = isHasTax;
    }

    public Double getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(Double taxRate) {
        this.taxRate = taxRate;
    }

    public Double getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(Double purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public Long getOrderRecordId() {
        return orderRecordId;
    }

    public void setOrderRecordId(Long orderRecordId) {
        this.orderRecordId = orderRecordId;
    }

    public Double getReturnDeliveryCount() {
        return returnDeliveryCount;
    }

    public void setReturnDeliveryCount(Double returnDeliveryCount) {
        this.returnDeliveryCount = returnDeliveryCount;
    }

    public Double getReturnReceiveCount() {
        return returnReceiveCount;
    }

    public void setReturnReceiveCount(Double returnReceiveCount) {
        this.returnReceiveCount = returnReceiveCount;
    }

    public Double getReplaceDeliveryCount() {
        return replaceDeliveryCount;
    }

    public void setReplaceDeliveryCount(Double replaceDeliveryCount) {
        this.replaceDeliveryCount = replaceDeliveryCount;
    }

    public Double getReplaceReceiveCount() {
        return replaceReceiveCount;
    }

    public void setReplaceReceiveCount(Double replaceReceiveCount) {
        this.replaceReceiveCount = replaceReceiveCount;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getReplaceId() {
        return replaceId;
    }

    public void setReplaceId(Long replaceId) {
        this.replaceId = replaceId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getSkuPic() {
        return skuPic;
    }

    public void setSkuPic(String skuPic) {
        this.skuPic = skuPic;
    }

    public Double getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public Double getPurchaseCount() {
        return purchaseCount;
    }

    public void setPurchaseCount(Double purchaseCount) {
        this.purchaseCount = purchaseCount;
    }

    public Double getReplaceCount() {
        return replaceCount;
    }

    public void setReplaceCount(Double replaceCount) {
        this.replaceCount = replaceCount;
    }

    public String getReplaceReason() {
        return replaceReason;
    }

    public void setReplaceReason(String replaceReason) {
        this.replaceReason = replaceReason;
    }

    public Integer getIsNeedReturn() {
        return isNeedReturn;
    }

    public void setIsNeedReturn(Integer isNeedReturn) {
        this.isNeedReturn = isNeedReturn;
    }

    public ReplaceGoodsDetailAssociatedDO getAssociatedDO() {
        return associatedDO;
    }

    public void setAssociatedDO(ReplaceGoodsDetailAssociatedDO associatedDO) {
        this.associatedDO = associatedDO;
    }
}
